/**
 * Copyright (C) 2019 Baidu, Inc. All Rights Reserved.
 */
package com.bailiban.service.impl;

import java.util.List;

import com.bailiban.dao.OrderDao;
import com.bailiban.dao.impl.OrderDaoImpl;
import com.bailiban.pojo.Order;
import com.bailiban.service.OrderService;
import com.bailiban.utils.ResultMsg;

/**
 * @author zhulang
 * @version 创建时间：2019年9月28日 上午10:40:15
 */
public class OrderServiceImpl implements OrderService {
    private OrderDao orderDao = new OrderDaoImpl();

    /*
     * (non-Javadoc)
     * 
     * @see com.bailiban.service.OrderService#findAllOrder()
     */
    @Override
    public List<Order> findAllOrder() {
        List<Order> list = orderDao.findAllOrder();
        return list;
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.bailiban.service.OrderService#findOrderByOid(int)
     */
    @Override
    public List<Order> findOrderByOid(String oid) {
        List<Order> list = orderDao.findOrderByOid(oid);
        return list;
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.bailiban.service.OrderService#findOrderByUid(int)
     */
    @Override
    public List<Order> findOrderByUid(int uid) {
        List<Order> list = orderDao.findOrderByUid(uid);
        return list;
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.bailiban.service.OrderService#addOrder(com.bailiban.pojo.Order)
     */
    @Override
    public ResultMsg addOrder(Order order) {
        ResultMsg resultMsg = orderDao.addOrder(order);
        return resultMsg;
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.bailiban.service.OrderService#deleteOrderByOid(int)
     */
    @Override
    public ResultMsg deleteOrderByOid(String oid) {
        ResultMsg resultMsg = orderDao.deleteOrderByOid(oid);
        return resultMsg;
    }

}
